package io.wins.vertx.entity;

import io.vertx.codegen.annotations.DataObject;
import io.vertx.core.json.JsonObject;

@DataObject(generateConverter = true)
public class Tag {
    private String code;
    private String name;

    public Tag(final JsonObject json) {
        TagConverter.fromJson(json, this);
    }

    public JsonObject toJson() {
        final JsonObject json = new JsonObject();
        TagConverter.toJson(this, json);
        return json;
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(final String code) {
        this.code = code;
    }

    public String getName() {
        return this.name;
    }

    public void setName(final String name) {
        this.name = name;
    }
}
